package com.mabs.ground.server.rest;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;


@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "request")
public class DataRequest {

    private String operationType;

    private int startRow;
    
    private int endRow;
    
    @XmlElement(name = "data")
    private Class<?>  entityClass;

    @XmlElement(name = "data")
    private Map<String, Object> criteria;

    private List<String> sortBy;

    public String getOperationType() {
        return operationType;
    }

    public int getStartRow() {
        return startRow;
    }

    public int getEndRow() {
        return endRow;
    }
    
	public Class<?> getEntityClass(){
		return entityClass;
	}
	

    public Map<String, Object> getCriteria() {
        return criteria;
    }

    public List<String> getSortBy() {
        if (sortBy == null) {
            sortBy = new ArrayList<String>();
        }
        return sortBy;
    }
}

